package cn.shangjia.shop.controller.mod;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.shangjia.common.domain.Group;
import cn.shangjia.common.util.StringUtils;
import cn.shangjia.shop.controller.base.AbstractController;
import cn.shangjia.shop.service.GroupService;

/**
 * @description 企业介绍控制器
 * @author  wangxin
 * @version 
 * @date 2011-11-03 上午10:34:16
 */
@Controller
public class CompanyProfileMod extends AbstractController {
	
	@Resource
	private GroupService groupService;
	
	/**
	 *  企业介绍页面
	 * 
	 * @param type
	 * @param userid
	 * @param model
	 * @return
	 * @author <a href="mailto:jinzhongze@knet.cn">jinzhongze</a>
	 */
	@RequestMapping("/shop/module/companyProfile/index.html")
	public void mod_companyProfile(ModelMap model, String userid){
		if (StringUtils.isEmpty(userid))
			return ;
		//商圈
		List<Group> groups = groupService.findGroupsByUserId(userid);
		model.addAttribute("groups", groups);
	}
	
}
